package cn.itcast.order.fegin;

import cn.itcast.entity.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

//指定需要调用的微服务名称
@FeignClient(name="shop-service-product")
public interface ProductFeginClient {

	//调用的请求路径
	@RequestMapping(value = "/product/{id}",method = RequestMethod.GET)
	public Product findById(@PathVariable("id") Long id);
}
